package example.Proxy;

public class Main {
    public static void main(String[] args) {
        UserService userService=new UserServiceImpl();
        userService.add();
        userService.delete();
        userService.update();
        userService.query();


        System.out.println("不改动原有业务逻辑下添加日志");

        UserServiceProxy userServiceProxy=new UserServiceProxy();
        userServiceProxy.setUserService(userService);
        userServiceProxy.add();
        userServiceProxy.delete();
        userServiceProxy.update();
        userServiceProxy.query();
    }
}
